aux_source_directory(mrapps SRC_MRAPPS)
include_directories(mrapps)

add_subdirectory(protos)

include_directories(${MAPREDUCE_PROTO_GEN_INCLUDE_DIRS})

add_executable(mrsequential mrsequential.cpp ${SRC_MRAPPS})
add_executable(map_reduce_master master.cpp ${SRC_MRAPPS})
add_executable(map_reduce_worker worker.cpp ${SRC_MRAPPS})
add_executable(client client.cc)

foreach (_target
        map_reduce_master
        map_reduce_worker
        client)
    target_link_libraries(${_target}
            lab1_proto
            absl::check
            absl::flags
            absl::flags_parse
            absl::log
            Threads::Threads
            ${_REFLECTION}
            ${_GRPC_GRPCPP}
            ${_PROTOBUF_LIBPROTOBUF})
endforeach ()